﻿@model qltscd.Models.BaseClient.DanhMucLyDoGiam
@{
    ViewBag.Title = "SuaLyDoGiam";
    Layout = "~/Views/Shared/Modules/_LayoutDanhMucNhapLieu.cshtml";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script>
    function submitTaoLyDoGiam(kieu) {
        document.getElementById("kieu").value = kieu;
        document.forms["TaoLyDoGiam"].submit();
    }
</script>

@using (Html.BeginForm("SuaLyDoGiam", "DanhMucLyDoGiam", FormMethod.Post, new { @id = "TaoLyDoGiam" }))
{
    @Html.ValidationSummary(true)
    @Html.HiddenFor(i=>i.IdentityLyDoGiam)
    <input type="hidden" value="0" name="kieu" id="kieu"/>
    <fieldset>
        <legend>Danh Mục Lý Do Giảm</legend>
        <table border="0" width="100%" cellpadding="10px" cellspacing="10px">
        <tr>
            <td style="margin-left: 10px;" class="label_col">
                Mã lý do giảm
            </td>
            <td >
                @Html.TextBoxFor(model => model.MaLyDoGiam, new { @style = "width:97%; " })


            </td>
        </tr>
        <tr>
            <td style="margin-left: 10px;" class="label_col">
                Tên lý do giảm
            </td>
            <td>
                @Html.TextBoxFor(model => model.TenLyDoGiam, new { @style = "width:97%; " })
               
            </td>
        </tr>
        </table>
        @*<p>
            <input type="submit" value="Create" />
        </p>*@
    </fieldset>
    <div class="divButton">
            <input type="submit" value="Lưu" class="button" />&nbsp;
            @*<input type="button" value="Lưu và nhập mới" class="button" onclick="submitTaoLyDoGiam(1)" />&nbsp;*@
            <input type="reset" value="Nhập lại" class="button" />&nbsp;
            @Html.ActionLink("Thoát", "Index", null, new { @class = "button" })
        </div>
}

@*<div>
    @Html.ActionLink("Back to List", "Index")
</div>*@
 <div class="errBlock">
                @Html.ValidationMessageFor(model => model.MaLyDoGiam, "", new { @style = "display:block" })
               
                        @ViewData[qltscd.Contansts.SessionConstants.ERROR_MESSAGE]
                    <br />
                                    @Html.ValidationMessageFor(model => model.TenLyDoGiam, "", new { @style = "display:block" })
                    </div>